package cn.stu.cms.service;

import cn.stu.cms.dto.CustomersDto;
import cn.stu.cms.dto.PageDto;
import cn.stu.cms.dto.SetTeamDto;
import cn.stu.cms.pojo.Customers;
import cn.stu.cms.util.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 客户服务
 * (Customers)表服务接口
 *
 * @author gh
 * @date 2023/09/19
 */
public interface CustomersService extends IService<Customers> {


    /**
     * 客户按 ID 选择
     *
     * @param customersId 客户编号
     * @return {@link R}
     */
    R<Customers> customersSelectById(Integer customersId);


    /**
     * 获取页面
     *
     * @param pageDto   页数到页
     * @param customers 客户
     * @return {@link R}<{@link Page}<{@link Customers}>>
     */
    R<Page<Customers>> getPage(PageDto<Customers> pageDto, Customers customers);

    /**
     * 添加
     *
     * @param dto 客户
     * @return {@link R}<{@link Boolean}>
     */
    R<Boolean> add(CustomersDto dto);

    /**
     * 编辑
     *
     * @param dto 客户
     * @return {@link R}<{@link Boolean}>
     */
    R<Boolean> edit(CustomersDto dto);

    /**
     * 删除
     *
     * @param customerId 客户ID
     * @return {@link R}<{@link Boolean}>
     */
    R<Boolean> delete(Long customerId);

    /**
     * 获取列表
     *
     * @return {@link R}<{@link Page}<{@link Customers}>>
     */
    R<List<Customers>> getList();

    /**
     * 设置团队
     *
     * @param setTeamDto 将团队数据设置为
     * @return {@link R}<{@link Boolean}>
     */
    R<Boolean> setTeam(SetTeamDto setTeamDto);
}

